package com.example.system.dao;

import com.example.system.model.Resource;
import com.example.system.dto.ResourceResult;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ResourceDao {
    int deleteByPrimaryKey(Integer id);

    int insert(Resource record);

    int insertSelective(Resource record);

    Resource selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Resource record);

    int updateByPrimaryKey(Resource record);


    List<Resource> selectByParentIds(@Param("parentIds") List<Integer> parentIds);

    void deleteBatchByPrimaryKeys(@Param("ids") List<Integer> ids);

    List<ResourceResult> selectAll();

    List<ResourceResult> selectResourcesByRoleId(@Param("roleId") Integer roleId);

    List<ResourceResult> selectResourcesByAdminId(@Param("adminId") Integer adminId);

}